package com.zbkj.admin.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@ApiModel
public class UserItemVO {

    @ApiModelProperty(value = "用户id", example = "10001")
    private Long userId;

    @ApiModelProperty(value = "用户名称", example = "张三")
    private String nickName;

    @ApiModelProperty(value = "用户账号", example = "1219893123980")
    private String account;

    @ApiModelProperty(value = "手机号", example = "1219893123980")
    private String phone;

    @ApiModelProperty(value = "用户等级", example = "2")
    private Integer level;

    @ApiModelProperty(value = "用户等级称号", example = "白银蟹粉")
    private String levelTitle;

    @ApiModelProperty(value = "等级计算额度", example = "10,000.00")
    private String totalQuota;

    @ApiModelProperty(value = "可用额度", example = "10,000.00")
    private String availableQuota;

    @ApiModelProperty(value = "可提现额度", example = "10,000.00")
    private String withdrawAmount;

    @ApiModelProperty(value = "即将到账金额", example = "10,000.00")
    private String comingAmount;

    @ApiModelProperty(value = "购物次数", example = "10")
    private Integer shoppingCount;

    @ApiModelProperty(value = "所属店铺名称", example = "店铺1")
    private String shopName;

    @ApiModelProperty(value = "用户身份", example = "MEMBER")
    private String identify;

    @ApiModelProperty(value = "用户身份描述", example = "会员")
    private String identifyDesc;

    @ApiModelProperty(value = "注册时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registerTime;

    @ApiModelProperty(value = "状态", example = "ENABLE")
    private String status;

    @ApiModelProperty(value = "状态描述", example = "ENABLE")
    private String statusDesc;

    @ApiModelProperty(value = "时间", example = "2024-01-01 12:00:00")
    private LocalDateTime closeTime;

    @ApiModelProperty(value = "员工号", example = "10001")
    private String employeeNo;

    @ApiModelProperty(value = "是否是推广人员", example = "true")
    private boolean isExtensionWorker;

    @ApiModelProperty(value = "一级朋友数量", example = "2")
    private Integer level1FriendCount;

    @ApiModelProperty(value = "二级朋友数量", example = "2")
    private Integer level2FriendCount;

    @ApiModelProperty(value = "直接推荐人", example = "张三")
    private String referee;

    @ApiModelProperty(value = "推荐时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime bindTime;

    @ApiModelProperty(value = "分润权限", example = "true")
    private Boolean spreadPower;

    @ApiModelProperty(value = "银行信息")
    private UserBankInfo bankInfo;

    @Data
    @ApiModel
    public static class UserBankInfo {

        @ApiModelProperty(value = "银行卡信息编号",example = "B0001")
        private String bankInfoCode;

        @ApiModelProperty(value = "账户名称", example = "张三")
        private String accountName;

        @ApiModelProperty(value = "银行卡号")
        private String bankcardNo;

        @ApiModelProperty(value = "银行卡号脱敏")
        private String bankcardNoDesensitize;

        @ApiModelProperty(value = "银行名称", example = "中国建设银行")
        private String bankName;
    }
}
